using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Stratman.DesktopProcess.Ec2Console
{
    /// <summary>
    /// Allows the user to enter a name and a description for a new group that they wish to create.
    /// </summary>
    public partial class CreateGroupForm : Form
    {
        /// <summary>
        /// Default constructor.
        /// </summary>
        public CreateGroupForm()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Gets the group name entered by the user.
        /// </summary>
        public string GroupName
        {
            get
            {
                return groupNameTextBox.Text;
            }
        }

        /// <summary>
        /// Gets the group description entered by the user.
        /// </summary>
        public string GroupDescription
        {
            get
            {
                return descriptionTextBox.Text;
            }
        }

        /// <summary>
        /// Event handler for when the cancel button is clicked; sets the DialogResult property
        /// appropriately and closes the form.
        /// </summary>
        /// <param name="sender">
        /// Object from which this event originated (the cancel button).
        /// </param>
        /// <param name="e">
        /// Arguments associated with the event.
        /// </param>
        private void cancelButton_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            Close();
        }

        /// <summary>
        /// Event handler for when the OK button is clicked; sets the DialogResult property
        /// appropriately and closes the form.
        /// </summary>
        /// <param name="sender">
        /// Object from which this event originated (the OK button).
        /// </param>
        /// <param name="e">
        /// Arguments associated with the event.
        /// </param>
        private void okButton_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            Close();
        }
    }
}